package org.flyframework.command
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	
	public class CommandBase extends EventDispatcher implements ICommand
	{
		
		[Bindable]
		public var name:String;
		[Bindable]
		public var icon:Class;
		
		
		//--------------------------------------------------------------------------
		// Init
		//--------------------------------------------------------------------------
		
		public function CommandBase( name:String=null )
		{
			this.name = name;
		}
		
		
		//--------------------------------------------------------------------------
		// ICommand
		//--------------------------------------------------------------------------
		
		public function execute( event:Event=null ):void
		{
			
		}
		
		public function undo( event:Event=null ):void
		{
			
		}
		
		public function canUndo():Boolean
		{
			return false;
		}
		
		public function redo( event:Event=null ):void
		{
			
		}
		
		public function canRedo():Boolean
		{
			return false;
		}
		
	}
}